package com.java.mall_imooc.form;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author jiangli
 * @since 2020-03-17 15:45
 */
@Data
public class ShippingForm {
    /**
     * 收货人姓名
     */
    @NotBlank(message = "收货人姓名不能为空")
    private String receiverName;
    /**
     * 收货人固定电话
     */
    @NotBlank(message = "收货人固定电话不能为空")
    private String receiverPhone;
    /**
     * 收货人移动电话
     */
    @NotBlank(message = "收货人移动电话不能为空")
    @Pattern(regexp = "1[3|4|5|7|8][0-9]\\d{8}", message = "手机号码格式不正确")
    private String receiverMobile;
    /**
     * 省份
     */
    @NotBlank(message = "省份不能为空")
    private String receiverProvince;
    /**
     * 城市
     */
    @NotBlank(message = "城市不能为空")
    private String receiverCity;
    /**
     * 区/县
     */
    @NotBlank(message = "区/县不能为空")
    private String receiverDistrict;
    /**
     * 详细地址
     */
    @NotBlank(message = "详细地址不能为空")
    private String receiverAddress;
    /**
     * 邮编
     */
    @NotBlank(message = "邮编不能为空")
    private String receiverZip;

}
